package com.xiliu.server.modules.become.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.xiliu.common.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 房管员认证表对象 xl_become
 *
 * @author xiliu
 * @date 2022-12-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("xl_become")
public class XlBecome extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 主键id */
    @ApiModelProperty("主键ID")
    @TableId(value = "become_id", type = IdType.AUTO)
    private Long becomeId;

    /** 真实姓名 */
    private String name;

    /** 认证级别 1普通 2房东 3房管员 */
    private Long level;

    /** 身份证号 */
    private String idnum;

    /** 手机号 */
    private String phone;

    /** 身份证照片 */
    private String img;

    /** 用户id */
    private Long userid;

    /** 申请时间 */
    private Date becomeDate;

    /** 审核状态 1待处理 2通过 3拒绝 */
    private Long state;

    /** 审核结果 */
    private String result;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "逻辑删除 1已删除 0未删除")
    private Boolean deleted;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private Long createdBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updatedTime;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新人")
    private Long updatedBy;

    /** 数据版本 */
    private Long version;

    /** 开始时间 */
    @TableField(exist = false)
    private String beginTime;

    /** 结束时间 */
    @TableField(exist = false)
    private String endTime;

    @ApiModelProperty(value = "微信昵称")
    @TableField(exist = false)
    private String userNickname;

    @ApiModelProperty(value = "用户手机")
    @TableField(exist = false)
    private String mobile;

    @ApiModelProperty(value = "身份证照片url")
    @TableField(exist = false)
    private List<String> imgUrl;

    @ApiModelProperty(value = "房产证信息")
    @TableField(exist = false)
    private List<XlBecomeItem> house;
}
